<template>
    <div>
      <van-tabbar v-show="showNav" v-model="active">
        <van-tabbar-item change="changeHandle" to="/" icon="home">首页</van-tabbar-item>
        <van-tabbar-item to="/job" icon="records">工作台</van-tabbar-item>
        <van-tabbar-item to="/release" icon="add2">发布</van-tabbar-item>
        <van-tabbar-item to="/message" icon="chat">消息</van-tabbar-item>
        <van-tabbar-item to="/mine" icon="records">我的</van-tabbar-item>
    </van-tabbar>
    </div>
</template>
<script>
import Vue from 'vue'
import { Tabbar, TabbarItem } from 'vant';

Vue.use(Tabbar).use(TabbarItem);
export default {
  components:{
[Tabbar.name]:Tabbar,
[TabbarItem.name]:TabbarItem

  },
  data () {
    return {
      showNav:false,
       active: 0,
      icon: {
        normal: '//img.yzcdn.cn/icon-normal.png',
        active: '//img.yzcdn.cn/icon-active.png'
      }
    }
  },
  watch:{
    $route(){
      this.showNav=this.$route.meta.showNav
    }
  },
  methods:{
    changeHandle(){
      console.log(2)
    }
  },
}
</script>
